<template>
    <view class="box" @tap="toSeeHouse(seehouse.seehouseapplicationId)">
        <view class="uni-flex uni-row">
            <view v-if="seehouse.seehouseapplicationHousestate == 0" class="text uni-flex" >
				<image src="http://192.168.43.54:8002/images/icon/agent/完成订单.png"></image>
			</view>
            <view v-else-if="seehouse.seehouseapplicationState == 1 && seehouse.seehouseapplicationHousestate == 1 " class="text uni-flex" >
				<image src="http://192.168.43.54:8002/images/icon/agent/通过.png"></image>
			</view>
            <view v-else class="text uni-flex" >
				<image src="http://192.168.43.54:8002/images/icon/agent/拒绝.png"></image>
			</view>
            <view class="uni-flex uni-column" style="-webkit-flex: 1;flex: 1;-webkit-justify-content: space-between;justify-content: space-between;">
                <view class="uni-flex uni-row" style="height:50rpx">
                    <view>申请编号:{{seehouse.seehouseapplicationId}}</view>
                    <view>申请时间:{{getdate()}}</view>
                </view>
                <view class="uni-flex uni-row" style="height:50rpx">
                    <view>房源编号:{{seehouse.houseId}}</view>
                    <view>申请人编号:{{seehouse.seehouseapplicationApplyerid}}</view>
                </view>
            </view>
            <view>
                <image class="to" src="http://192.168.43.54:8002/images/userMain/to.png"></image>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    props:["seehouse"],
    data() {
        return {
            
        }
    },
    methods: {
        getdate() {
            var now = new Date(this.seehouse.seehouseapplicationTime),
                y = now.getFullYear(),
                m = now.getMonth() + 1,
                d = now.getDate();
            // return y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d) + " " + now.toTimeString().substr(0, 8);
            return y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
        },
        toSeeHouse(seehouseapplicationId){
            uni.navigateTo({
                url: './apply_detail?id='+seehouseapplicationId
            })
        },
        
    },
    onLoad(){
        
    }
}
</script>

<style>
.box{
    margin: 10rpx 0rpx;
    padding: 20rpx 10rpx;
    background-color: rgb(255, 255, 255);
    width: 100%;
    height: 130rpx;
}

image{
width: 100rpx;
height: 100rpx;
}

</style>